package Meituan;

import java.util.List;

/**
 * @author: leiwenkang
 * @date: 2020/7/2
 * @time: 20:51
 */
public class Toutiao2 {

    public void insert(List<Pair> pairs, Pair insertPair) {
        for (int i = 0; i < pairs.size(); i++) {
            if (check(pairs.get(i), insertPair)) {

            }
        }
    }

    private boolean check(Pair pair, Pair insertPair) {
        if (insertPair.left > pair.right || insertPair.right < pair.left) {
            return false;
        }

        return true;
    }
}



class Pair {
    int left;
    int right;

}
